package com.pointcircle.core.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.pointcircle.core.JpaBaseEntity;

import lombok.Getter;
import lombok.Setter;

@Entity
@Table(name = "t_user",
	indexes = {
		@Index(name = "idx_t_user_username", columnList = "username")
	}
)
@Getter
@Setter
public class User extends JpaBaseEntity<String> {
	@Id
	@Column(name = "user_id")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@GeneratedValue(generator = "system-uuid")
	private String id;
	
	@Column(name = "username", nullable = false)
	private String username;

	@Column(name = "password_hex", nullable = false)
	private String passwordHex;
	
	@Column(name = "realname", nullable = false)
	private String realname;
}
